home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / appkit / PrintInfo.h < prev    next >
Text File  |  1992-09-11  |  5KB  |  153 lines

  1. /*
  2.     PrintInfo.h
  3.     Application Kit, Release 2.0
  4.     Copyright (c) 1988, 1989, 1990, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import <objc/Object.h>
  8. #import "graphics.h"
  9. #import <dpsclient/dpsclient.h>
  10. #import "NXPrinter.h"
  11.  
  12. /* Page Order */
  13.  
  14. #define NX_DESCENDINGORDER    (-1)    /* descending order of pages */
  15. #define NX_SPECIALORDER        0    /* special order. tells the spooler
  16.                      * to not rearrange pages */
  17. #define NX_ASCENDINGORDER    1    /* ascending order of pages */
  18. #define NX_UNKNOWNORDER        2    /* no page order written out */
  19.  
  20. /* Page Orientation */
  21.  
  22. #define NX_LANDSCAPE        1    /* long side horizontal */
  23. #define NX_PORTRAIT        0    /* long side vertical */
  24.  
  25. /* Pagination Modes */
  26.  
  27. #define NX_AUTOPAGINATION    0    /* auto pagination */
  28. #define NX_FITPAGINATION    1    /* force image to fit on one page */
  29. #define NX_CLIPPAGINATION    2    /* let image be clipped by page */
  30.  
  31. typedef struct _PrivatePrintInfo *NXPrivatePrintInfo;
  32.  
  33. @interface PrintInfo : Object
  34. {
  35.     char               *paperType;
  36.     NXRect              paperRect;
  37.     NXCoord             leftPageMargin;
  38.     NXCoord             rightPageMargin;
  39.     NXCoord             topPageMargin;
  40.     NXCoord             bottomPageMargin;
  41.     float               scalingFactor;
  42.     char                pageOrder;
  43.     struct _pInfoFlags {
  44. #ifdef __BIG_ENDIAN__
  45.     unsigned int        orientation:1;
  46.     unsigned int        horizCentered:1;
  47.     unsigned int        vertCentered:1;
  48.     unsigned int        _RESERVEDA:2;
  49.     unsigned int        manualFeed:1;    /* Obsolete */
  50.     unsigned int        allPages:1;
  51.     unsigned int        _RESERVEDC:1;
  52.     unsigned int        horizPagination:2;
  53.     unsigned int        vertPagination:2;
  54.     unsigned int        printerIsOld:1;
  55.     unsigned int        reversePageOrder:1;
  56.     unsigned int        _RESERVEDB:2;
  57. #else
  58.     unsigned int        _RESERVEDB:2;
  59.     unsigned int        reversePageOrder:1;
  60.     unsigned int        printerIsOld:1;
  61.     unsigned int        vertPagination:2;
  62.     unsigned int        horizPagination:2;
  63.     unsigned int        _RESERVEDC:1;
  64.     unsigned int        allPages:1;
  65.     unsigned int        manualFeed:1;       /* Obsolete */
  66.     unsigned int        _RESERVEDA:2;
  67.     unsigned int        vertCentered:1;
  68.     unsigned int        horizCentered:1;
  69.     unsigned int        orientation:1;
  70. #endif
  71.     }                   pInfoFlags;
  72.     int                 firstPage;
  73.     int                 lastPage;
  74.     int                 currentPage;
  75.     int                 copies;
  76.     char               *outputFile;
  77.     DPSContext          context;
  78.     NXPrivatePrintInfo  _privateData;
  79.     char               *printerName;
  80.     char               *printerType;
  81.     char               *printerHost;
  82.     int                 resolution;        /* Obsolete */
  83.     short               pagesPerSheet;
  84.     unsigned short      _reservedPrintInfo1;
  85.     NXPrinter        *printerObject;
  86.     id            jobFeaturesTable;
  87.     const char        *paperFeed;
  88.     unsigned int        _reservedPrintInfo5;
  89. }
  90.  
  91. + (NXPrinter *)getDefaultPrinter;
  92. + setDefaultPrinter:(NXPrinter *)pr;
  93.  
  94. - init;
  95. - free;
  96. - setPaperType:(const char *)type andAdjust:(BOOL)flag;
  97. - (const char *)paperType;
  98. - setPaperRect:(const NXRect *)aRect andAdjust:(BOOL)flag;
  99. - (const NXRect *)paperRect;
  100. - setMarginLeft:(NXCoord)leftMargin right:(NXCoord)rightMargin top:(NXCoord)topMargin bottom:(NXCoord)bottomMargin;
  101. - getMarginLeft:(NXCoord *)leftMargin right:(NXCoord *)rightMargin top:(NXCoord *)topMargin bottom:(NXCoord *)bottomMargin;
  102. - setScalingFactor:(float)aFloat;
  103. - (float)scalingFactor;
  104. - setOrientation:(char)mode andAdjust:(BOOL)flag;
  105. - (char)orientation;
  106. - setHorizCentered:(BOOL)flag;
  107. - (BOOL)isHorizCentered;
  108. - setVertCentered:(BOOL)flag;
  109. - (BOOL)isVertCentered;
  110. - setHorizPagination:(int)mode;
  111. - (int)horizPagination;
  112. - setVertPagination:(int)mode;
  113. - (int)vertPagination;
  114. - setOutputFile:(const char *)aString;
  115. - (const char *)outputFile;
  116. - setPageOrder:(char)mode;
  117. - (char)pageOrder;
  118. - setAllPages:(BOOL)flag;
  119. - (BOOL)isAllPages;
  120. - setFirstPage:(int)anInt;
  121. - (int)firstPage;
  122. - setLastPage:(int)anInt;
  123. - (int)lastPage;
  124. - (int)currentPage;
  125. - setCopies:(int)anInt;
  126. - (int)copies;
  127. - setContext:(DPSContext)aContext;
  128. - (DPSContext)context;
  129. - setPagesPerSheet:(short)aShort;
  130. - (short)pagesPerSheet;
  131. - setReversePageOrder:(BOOL)flag;
  132. - (BOOL)reversePageOrder;
  133. - setPrinter:(NXPrinter *)pr;
  134. - (NXPrinter *)printer;
  135. - setPaperFeed:(const char *)str;
  136. - (const char *)paperFeed;
  137. - initializeJobDefaults;
  138. - setJobFeature:(const char *)feature toValue:(const char *)string;
  139. - (const char *)valueForJobFeature:(const char *)feature;
  140. - removeJobFeature:(const char *)feature;
  141. - (const char **)jobFeatures;
  142. - write:(NXTypedStream *)stream;
  143. - read:(NXTypedStream *)stream;
  144.  
  145. /* 
  146.  * The following new... methods are now obsolete.  They remain in this  
  147.  * interface file for backward compatibility only.  Use Object's alloc method  
  148.  * and the init... methods defined in this class instead.
  149.  */
  150. + new;
  151.  
  152. @end
  153.